	
export const getters = {
    counter: state => state.Num.counter,
    user:state=>state.User.user,
    cartList:state=>state.Cart.cartList, //获取购物车列表
    stateAll:state=>state.Cart.stateAll,
    totalPrice:state=>{
      let cartList = state.Cart.cartList // 购物车列表
      let total = cartList.reduce(
        (prevous, current) => prevous + (current.state? current.price * current.num:0),
        0
      );
      return total * 100;
    }
  };